PROJECT(YiDaoAIOT-Middleware) 
#set(CMAKE_INSTALL_PREFIX  /home/share/yidaoaiotcloud/YiDaoAIOT-Middleware)
cmake_minimum_required(VERSION 3.16)

SET( CMAKE_VERBOSE_MAKEFILE on )
SET(CMAKE_SYSTEM_NAME Linux)

#输出目录
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/${PLATFORM}/bin)
set(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/${PLATFORM}/libs)

#安装目录
set(CMAKE_INSTALL_PREFIX  ${PROJECT_BINARY_DIR}/../../YiDaoAIOT-Release/${PLATFORM})

#编译类型
if(${BuildType} STREQUAL "Debug")
    set(CMAKE_BUILD_TYPE "Debug")    #
    ADD_DEFINITIONS("-DDebug")
else()
    set(CMAKE_BUILD_TYPE "Release")    #
    #ADD_DEFINITIONS("-DRelease")
endif()

#必须设置CMAKE_BUILD_TYPE 的参数才生效
set(CMAKE_CXX_FLAGS_DEBUG "$ENV{CXXFLAGS} -O0 -W -Wall -g  -std=c++11 -D__const__= -pipe -Wno-unused-parameter -fPIC -fno-omit-frame-pointer")
set(CMAKE_CXX_FLAGS_RELEASE "$ENV{CXXFLAGS} -O2 -W -Wall -s  -std=c++11 -D__const__= -pipe -Wno-unused-parameter -fPIC -fno-omit-frame-pointer")


#头文件路径
#INCLUDE_DIRECTORIES()

#链接库路径
#link_directories() 

#连接的库
#link_libraries(brpc cjson  gflags glog  boost_regex protobuf pthread crypto protoc ttscei uuid )
   

#项目依赖的模块目录
add_subdirectory("src")
#add_subdirectory("test")
